package com.nintendo.mapper;

import com.nintendo.dto.EbookDTO;
import com.nintendo.entity.Ebook;
import com.nintendo.vo.EbookVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EbookMapper {
    @Select("select *from ebook")
    List<Ebook> selectAllEbooks();

    List<EbookVO> selectEbooksByName(EbookDTO ebookDTO);

    void deleteById(Long id);

    EbookVO selectById(Long id);
    void updateEbookById(Ebook ebook);
    void saveEbook(Ebook ebook);

    List<Ebook> findAll();
    List<Ebook> findByCategoryId2(Long id);

}